package edu.gu.hajo.gcl.cmd.impl;

import edu.gu.hajo.gcl.interp.IInterpreter;

public class ReturnCmd extends AbstractCmd {

	public ReturnCmd(IInterpreter interp) {
		super(interp);
	}

	@Override
	public void execute() {
		if (args != null) {
			if (args.size() > 0) {
				interp.setResult(args.get(0));
			}else{
				interp.setResult("");
			}
		}
		interp.setReturn(true);
		//throw new RuntimeException("TCL_RETURN");
	}
}
